package site.ruyi.devclient.client.redis.impl.DO;

import site.ruyi.devclient.client.redis.RedisTreeNode;

/**
 * Key节点
 * @author self
 *
 */
public class RedisKeyTreeNode extends RedisTreeNode {
	
	/**
	 * DB编号
	 */
	private int db;
	
	/**
	 * key类型
	 */
	private String type;
	
	/**
	 * Key名称
	 */
	private String key;
	
	public RedisKeyTreeNode(int db,String type,String key) {
		this.db = db;
		this.type = type;
		this.key = key;
		
		this.setText(key);
		this.setLeaf(true);
	}

	public int getDb() {
		return db;
	}

	public String getType() {
		return type;
	}
	
	public void setKey(String key) {
		this.key = key;
		this.setText(key);
	}
	
	public String getKey() {
		return key;
	}
}
